//
//  SCNInvestmentBackMoneyViewModel.swift
//  ShoucainuSwift
//
//  Created by 王家旭 on 2017/11/16.
//  Copyright © 2017年 Riluee. All rights reserved.
//

import UIKit
import ObjectMapper

class SCNInvestmentBackMoneyViewModel: NSObject {

    func requestInvestInvestStatus(_ param: [String : String], successBlock:@escaping ((_ dataresult: SCNInvestmentDataresultModels) -> Void)) -> Void {
        
        SCNRequestManager.postRequest(param, URL: SCNRequestAPI.invest().investStatus) { (response) in
            
            let investmentModels = Mapper<SCNInvestmentModels>().map(JSONObject: response.result.value)
            
            if let tmp = investmentModels?.dataresult {
                successBlock(tmp)
            }
        }
        
    }
}
